<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>选项配置</title>
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
    <link href="css/index_css.css" rel="stylesheet" type="text/css" />
    <script src="<%=path%>/js/resizeIframe.js" type="text/javascript"></script>
    <script language="javascript" src="<%=path %>/js/syAjax.js"></script>
    <script type="text/javascript">
    function tdClick(url)
    {
      window.location.href=url;
    }
    
    function initCode(){
    	var elementName="html-select";
    	syAjax.request("post","<%=path %>/getNewMenuByElementNameCodeMaintenanceAction.action","elementName="+elementName,{success:initSuccessResult,fail:onFail,type:'plain'});
    }
    
    function initSuccessResult(response){
    if(response=="true"){
    alert("初始化选项配置成功！");
    window.location.href="<%=path %>/findAllCodeMaintenanceTypeCodeMaintenanceAction.action";
    }
    }
    
    function onFail(){
		alert("网络繁忙，请稍后再试");
	}
    </script>
  </head>
  
  <body onload="resizeIframe();">
  <form method="post" action="<%=path %>/findCodeMaintenanceTypeByNameCodeMaintenanceAction.action">
    <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
    <td colspan="2" align="left" class="f_5">基本设置</td>
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#9DD12E"></td>
  </tr>
  <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="bottom" background="<%=path%>/images/sywesp_24.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
     
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/getGradeListGradeAndClassAction.action');" style="cursor:pointer;">年级设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td> 
             <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path %>/getGradeListGradeAndClassAction.action?setGraduation=true');" style="cursor:pointer;">毕业年级</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" onClick="tdClick('<%=path%>/findGradeAndClassBySchoolGradeAndClassAction.action?year=${applicationScope.currentYear}');"" style="cursor:pointer;">班级设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="85" align="left"><table width="100" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/getAllYearAndSchoolTermyearAndSchoolTermAction.action');" style="cursor:pointer;">年度学期设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/findCourseByParentCourseIdCourseAction.action');" style="cursor:pointer;">学科设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="80" align="left"><table width="80" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/findAllOrganizationByTypeorganizationAction.action?organization.orgType=1');" style="cursor:pointer;">教研组设置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path%>/images/sywesp_25.gif" class="f_9">选项配置</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            
            <td width="70" align="left"><table width="70" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path%>/images/sywesp_18.gif" class="f_6" onclick="tdClick('<%=path %>/baseSet/openClose.jsp');" style="cursor:pointer;">开关控制</td>
                <td width="5" align="right" valign="bottom" background="<%=path%>/images/sywesp_18.gif"><img src="<%=path%>/images/sywesp_19.gif" width="5" height="31" /></td>
              </tr>
            </table></td>
             <td width="70" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="images/sywesp_18.gif" class="f_6" style="cursor:pointer;" nowrap="nowrap" onclick="tdClick('<%=path %>/initMethodGraduationAndUpgradeAction.action');">毕业升级</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>
            <td width="70" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" background="<%=path %>/images/sywesp_18.gif" class="f_6" style="cursor:pointer;" nowrap="nowrap" onclick="tdClick('<%=path %>/toClassSectionTimesListClassSectionTimesAction.action');">课时管理</td>
                <td width="1" height="31" align="right" valign="bottom" bgcolor="#CBCBCB"></td>
              </tr>
            </table></td>

           
            <td align="left">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="tb_8 border_2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" align="left" bgcolor="#FFFFFF" class="f_8">注：点击选项后的按钮可以对当前代码字段进行维护。&nbsp;&nbsp;&nbsp;&nbsp;名称：<input type="text" name="codeMaintenanceType.name" value="${codeMaintenanceType.name }"  />&nbsp;&nbsp;<input type="submit" value="查找" />&nbsp;</td>
              </tr>
            <tr>
              <td height="30" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="2" height="24" align="left" background="<%=path%>/images/sywesp_21.gif"><img src="<%=path%>/images/sywesp_20.gif" width="2" height="24" /></td>
                                <td align="left" background="<%=path%>/images/sywesp_21.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="8%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />序号</td>
                                      <td width="30%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />代码标识</td>
                                      <td width="54%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />名称</td>
                                      <td width="8%" align="left" class="f_8"><img src="<%=path%>/images/sywesp_23.gif" width="8" height="22" align="absmiddle" />选项</td>
                                      </tr>
                                </table></td>
                                <td width="4" align="right" background="<%=path%>/images/sywesp_21.gif"><img src="<%=path%>/images/sywesp_22.gif" width="4" height="24" /></td>
                              </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="25" align="left" valign="top" class="tb_7"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                                <c:if test="${! empty codeMaintenanceTypeList}">
                                <c:forEach items="${codeMaintenanceTypeList}" var="codeMaintenanceType" varStatus="s">
                                    <tr onmouseover="this.style.backgroundColor='d4d0c7'" onmouseout="this.style.backgroundColor=''" valign="middle">
                                      <td width="8%" align="left">&nbsp;&nbsp;${s.count }</td>
                                      <td width="30%" height="25" align="left">${codeMaintenanceType.codeId }</td>
                                      <td width="54%" align="left">${codeMaintenanceType.name }</td>
                                      <td width="8%">
                                      	<a href="<%=path%>/findCodeMaintenanceTypeByIdCodeMaintenanceAction.action?codeMaintenanceType.codeId=${codeMaintenanceType.codeId }&codeMaintenanceType.onlyRead=${codeMaintenanceType.onlyRead}" ><span style="vertical-align: middle;"><img src="<%=path%>/images/icon_17.gif" width="40" height="19" style="border: 0;"/></span></a>
									  </td>
                                    </tr>
                                </c:forEach>
                                </c:if>
                                </table></td>
                              </tr>
                            </table>
                              </td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td align="right">
                    
                    <a href="javascript:initCode();">补充选项配置</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 
                    </td>
                  </tr>
              </table></td>
            </tr>
          </table>
          </td>
      </tr>
      <tr>
        <td class="tb_9 border_3">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="left"><b>链接说明：</b></td>
                </tr>
                <tr>
                  <td height="30" align="left" valign="bottom">点击补充选项配置可将在配置文件中新添加的选项配置初始化到数据库中</td>
                </tr>
              </table>
        </td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
  </body>
</html>
